package com.order.service;

import com.order.entity.Order;
import com.order.exception.CustomException;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author
 */
@Service
public interface OrderService {

	/**
	 * 插入
	 *
	 * @param entity
	 * @param sessionId
	 * @return
	 * @throws CustomException
	 */
	Map<String, Object> insert(Order entity, String sessionId)throws CustomException;

	/**
	 * 删除
	 *
	 * @param no
	 * @param sessionId
	 * @return
	 * @throws CustomException
	 */
	Map<String, Object> delete(Integer no, String sessionId)throws CustomException;

	/**
	 * 更新
	 *
	 * @param entity
	 * @param sessionId
	 * @return
	 * @throws CustomException
	 */
	Map<String, Object> update(Order entity, String sessionId)throws CustomException;

	/**
	 * 按ID查询
	 *
	 * @param id
	 * @param sessionId
	 * @return
	 * @throws CustomException
	 */
	Map<String,Object> selectByNo(Integer id, String sessionId)throws CustomException;

	/**
	 * 发送订单
	 * @param  entity
	 * @param sessionId
	 * @return
	 * @throws CustomException
	 */


	Map<String,Object>send(Order entity, String sessionId)throws CustomException;


	void consumer(String message)throws  CustomException;
}
